<?php

class It_Form_Auth extends Zend_Form
{
    public function init()
    {
        $username = new Zend_Form_Element_Text('username');
        $username->setLabel('Tài khoản')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
                
        $password = new Zend_Form_Element_Password('password');
        $password->setLabel('Mật khẩu')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
        
        $hash = new Zend_Form_Element_Hash('no_csrf_foo');
        $this->addElement('hash','no_csrf_foo',array(
            'salt' => 'vgrlwoWwRlSVLLmN'
        ));
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Đăng nhập');
        $submit->setAttrib('id','submitbutton');
        $submit->setAttrib('class',"button medium");
        $this->setAttrib('class',"login");
        $this->addElements(array (
            $username ,$password ,$submit
        ));
    }
}

